import axios from 'axios';

const requests = axios.create({
    baseURL: '/booksManageSystem',
    timeout: 5000
});


//请求拦截器   Cannot read properties of undefined (reading 'cancelToken')==>>将config返回
requests.interceptors.request.use(config => {
    return config;
});

//响应拦截器
requests.interceptors.response.use(res => {
    return res.data; //解决返回出现看不太懂得代码，有出入
});


export default requests;